<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
	
<div id="login" class="boxed"><c:choose>
	<c:when test="${SPRING_SECURITY_CONTEXT==null}">
		<h2 class="title">Client Account</h2>
		<div class="content">
		
		<form id="form1" method="post"
			action="/ladybug/j_spring_security_check">
		<fieldset><legend>Sign-In</legend>
		<c:if test="${SPRING_SECURITY_LAST_EXCEPTION != null}">
			<font style="color: red;"><c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"></c:out></font>
		</c:if><br>
		<label for="inputtext1">Client
		ID:</label> <input id="inputtext1" type="text" name="j_username" value="" />
		<label for="inputtext2">Password:</label> <input id="inputtext2"
			type="password" name="j_password" value="" /> <input
			id="inputsubmit1" type="submit" name="inputsubmit1" value="Sign In" />
		<p><a href="#">Forgot your password?</a></p>
		</fieldset>
		</form>
		</div>
	</c:when>
	<c:otherwise>

		<h2 class="title">User logged</h2>
		<div class="content"><c:out
			value="${SPRING_SECURITY_CONTEXT.authentication.principal.utente.nickname}" />
		</div>
	</c:otherwise>
</c:choose></div>
